<!-- 产房楼层 -->
<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/index.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/autoComplete.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/css/reset.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/alert.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/alert-form.css">
</script>
    <div class="layui-form layui-fluid row">
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
                楼层编号：
            </label>
            <div class="layui-input-block">
                <input type="text" name="tcFlrId" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
                厂房：
            </label>
            <div class="layui-input-block">
                <input type="text" name="tcFlrFtyid" required lay-verify="required" autocomplete="off" class="layui-input" id="tcFlrFtyid">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
                楼层名称：
            </label>
            <div class="layui-input-block">
                <input type="text" name="tcFlrName" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">楼层描述：</label>
            <div class="layui-input-block">
                <textarea name="tcFlrDsc" id="tcFlrDsc" cols="30" rows="10"></textarea>
            </div>
        </div>
        <div class="footer layui-form-item layui-fluid" style="margin-top: 30px;">
            <button data-lang="confirm" class="btn1 layui-btn layui-btn-radius layui-btn-primary"
                lay-filter="submit" lay-submit>确定</button>
            <button data-lang="cancel" class="btn2 layui-btn layui-btn-radius layui-btn-primary">取消</button>
        </div>
    </div>
<script>
   layui.use(['table', 'admin', 'laypage', 'jquery', 'laytpl', 'tree', 'form', 'api', 'view', 'laydate', 'setter', 'treeSelect','element','utill'], function () {
        var form = layui.form;
        var table = layui.table;
        var admin = layui.admin;
        var laypage = layui.laypage;
        var $ = layui.jquery;
        var laytpl = layui.laytpl;
        var tree = layui.tree;
        var api = layui.api;
        var view = layui.view;
        var laydate = layui.laydate;
        var setter = layui.setter;
        var treeSelect = layui.treeSelect;
        var utill = layui.utill;
        var element = layui.element;
              utill.fuzzmatch('#tcFlrFtyid', {
                isShowValue: false,
                reqObj: {
                    url: api.host + '/tcEamFactory/selectDevFactory.json',
                    type: 'POST',
                    dataType: 'json',
                    contentType: 'application/json',
                    data:JSON.stringify({
                        tcFtyName: $('#tcFlrFtyid').val(),
                        pageNum: 1,
                        pageSize: 10000
                    }),
                },
                dataTrans: function (res) {
                    return res.data.list.map((item) => {
                        return {
                            label: item.tcFtyName,
                            value: item.tcFtyId,
                            data: item
                        }
                    })
                }
            });
    });
</script>